package cn.zbmao.web.util.dao;

import cn.zbmao.web.dao.*;
import cn.zbmao.web.dao.impl.HostDaoImpl;
import cn.zbmao.web.dao.impl.SuccessfulNewsForUserDaoImpl;

public class DaoFactory {
    /**
     * 对所有Dao层经行初始化
     */
	private static UserDao userDao ;
	private static NewsDao newsDao ;
	private static HostDao hostDao ;
    private static LocationDao locationDao;
    private static QualificationDao qualificationDao;
    private static TenderNewsDao tenderNewsDao;
    private static SuccessfulNewsForUserDao successfulNewsForUserDao;
	static{
		userDao = new UserDao();
		newsDao = new NewsDao();
		hostDao = new HostDaoImpl();
        locationDao = new LocationDao();
        qualificationDao = new QualificationDao();
        tenderNewsDao = newsDao;
        successfulNewsForUserDao = new SuccessfulNewsForUserDaoImpl();

	}
	public static UserDao getUserDao() {
		return userDao;
	}
	public static NewsDao getNewsDao() {
		return newsDao;
	}
	public static HostDao getHostDao() {
		return hostDao;
	}

    public static TenderNewsDao getTenderNewsDao() {
        return tenderNewsDao;
    }

    public static SuccessfulNewsForUserDao getSuccessfulNewsForUserDao() {
        return successfulNewsForUserDao;
    }

    public static LocationDao getLocationDao() {
        return locationDao;
    }

    public static QualificationDao getQualificationDao() {
        return qualificationDao;
    }
}
